//
//  AYSPlayView.m
//  AiYingShiProject
//
//  Created by lanou on 15/11/9.
//  Copyright (c) 2015年 李晓理. All rights reserved.
//

#import "AYSPlayView.h"
#import <AVFoundation/AVFoundation.h>
@implementation AYSPlayView
// 在开发中，单纯使用AVPlayer类是无法显示视频的，要将视频层添加至AVPlayerLayer中，这样才能将视频显示出来
// 使PlayerView的layer为AVPlayerLayer
+ (Class)layerClass
{
    return [AVPlayerLayer class];
}

- (AVPlayer *)player
{
    return [(AVPlayerLayer *)[self layer] player];
}

- (void)setPlayer:(AVPlayer *)player
{
    [(AVPlayerLayer *)[self layer] setPlayer:player];
}


@end
